// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Dash.generated.h"


UCLASS( ClassGroup=(TimeAndSpance), meta=(BlueprintSpawnableComponent) )
class MISCELLANEOUSPROJECT_API UDash : public UActorComponent
{
	GENERATED_BODY()

public:	
	// Sets default values for this component's properties
	UDash();

protected:
	// Called when the game starts
	virtual void BeginPlay() override;

public:	
	UFUNCTION(BlueprintCallable, Category = TimeAndSpace)
	void ActivateAbility();

private:
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = TimeAndSpace, meta = (AllowPrivateAccess = "true"))
	float ForceMultiplier;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = TimeAndSpace, meta = (AllowPrivateAccess = "true"))
	float DashDuration;
	bool IsDashActive;
	class ACharacter* Character;

private:
	void StopMovementImmediately();
	void SetIsDashActive(bool NewValue);
};
